:host {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
}

.manus-show {
    display: flex;
    height: 100%;
    overflow: hidden;
    font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f8fafc;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    
    .file-explorer {
        width: 280px;
        background-color: #fff;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
        z-index: 1;
        display: flex;
        flex-direction: column;

        .explorer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 16px;
            border-bottom: 1px solid #edf2f7;
            
            h2 {
                margin: 0;
                font-size: 16px;
                font-weight: 600;
                color: #2d3748;
            }
            
            .explorer-icon {
                width: 32px;
                height: 32px;
                border-radius: 6px;
                background-color: #ebf5ff;
                display: flex;
                align-items: center;
                justify-content: center;
                
                i {
                    color: #3182ce;
                    font-size: 18px;
                }
            }
        }
        
        .file-list {
            display: flex;
            flex-direction: column;
            padding: 12px;
            gap: 8px;
            
            .file-button {
                display: flex;
                align-items: center;
                width: 100%;
                padding: 12px;
                border: none;
                border-radius: 6px;
                background: #fff;
                text-align: left;
                cursor: pointer;
                transition: all 0.2s ease;
                box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
                
                .file-icon {
                    margin-right: 10px;
                    font-size: 16px;
                    color: #a0aec0;
                }
                
                .file-name {
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    color: #4a5568;
                    font-size: 14px;
                }
                
                &:hover {
                    background: #f7fafc;
                    transform: translateY(-1px);
                    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
                }
                
                &.active {
                    background: #ebf8ff;
                    color: #2b6cb0;
                    box-shadow: 0 2px 5px rgba(66, 153, 225, 0.15);
                    
                    .file-icon {
                        color: #3182ce;
                    }
                    
                    .file-name {
                        color: #2b6cb0;
                        font-weight: 500;
                    }
                }
            }
        }
    }
    
    .file-content {
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
        background-color: #fff;
        
        .content-header {
            padding: 14px 24px;
            border-bottom: 1px solid #edf2f7;
            
            h3 {
                margin: 0;
                font-size: 18px;
                font-weight: 600;
                color: #2d3748;
            }
        }
        
        .loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 0;
            
            .spinner {
                width: 40px;
                height: 40px;
                border: 3px solid #e2e8f0;
                border-top: 3px solid #3182ce;
                border-radius: 50%;
                animation: spin 1s linear infinite;
                margin-bottom: 16px;
            }
            
            span {
                color: #718096;
                font-size: 14px;
            }
            
            @keyframes spin {
                0% { transform: rotate(0deg); }
                100% { transform: rotate(360deg); }
            }
        }
        
        .error {
            display: flex;
            align-items: center;
            padding: 16px 24px;
            margin: 24px;
            background: #fff5f5;
            border-radius: 6px;
            border-left: 4px solid #f56565;
            
            .error-icon {
                margin-right: 12px;
                color: #e53e3e;
                font-size: 18px;
            }
            
            .error-message {
                color: #c53030;
                font-size: 14px;
            }
        }
        
        .markdown-wrapper {
            display: flex;
            flex: 1;
            padding: 24px;
            overflow-y: auto;
            
            // Markdown 样式会由 typing-html 组件处理
            ::ng-deep {
                h1, h2, h3, h4, h5, h6 {
                    margin-top: 24px;
                    margin-bottom: 16px;
                    font-weight: 600;
                    line-height: 1.25;
                    color: #1a202c;
                }
                
                h1 {
                    font-size: 24px;
                    border-bottom: 1px solid #edf2f7;
                    padding-bottom: 8px;
                }
                
                h2 {
                    font-size: 20px;
                    border-bottom: 1px solid #edf2f7;
                    padding-bottom: 6px;
                }
                
                p {
                    margin-bottom: 16px;
                    line-height: 1.7;
                    color: #4a5568;
                }
                
                ul, ol {
                    padding-left: 2em;
                    margin-bottom: 16px;
                    color: #4a5568;
                }
                
                li {
                    margin-bottom: 4px;
                }
                
                code {
                    padding: 0.2em 0.4em;
                    background: #edf2f7;
                    border-radius: 3px;
                    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
                    font-size: 0.9em;
                    color: #2d3748;
                }
                
                pre {
                    padding: 16px;
                    overflow: auto;
                    background-color: #f7fafc;
                    border-radius: 6px;
                    line-height: 1.45;
                    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
                    margin-bottom: 16px;
                    
                    code {
                        background: transparent;
                        padding: 0;
                    }
                }
                
                blockquote {
                    padding: 0 1em;
                    color: #718096;
                    border-left: 0.25em solid #e2e8f0;
                    margin: 0 0 16px 0;
                }
                
                table {
                    border-collapse: collapse;
                    width: 100%;
                    margin-bottom: 16px;
                    
                    th, td {
                        padding: 8px 12px;
                        border: 1px solid #e2e8f0;
                    }
                    
                    th {
                        background: #f7fafc;
                        font-weight: 600;
                    }
                    
                    tr:nth-child(even) {
                        background-color: #f9fafb;
                    }
                }
            }
        }
    }
    
    .welcome-message {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #fff;
        
        .welcome-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            
            .welcome-icon {
                font-size: 48px;
                color: #cbd5e0;
                margin-bottom: 16px;
            }
            
            p {
                color: #718096;
                font-size: 16px;
            }
        }
    }
}